﻿using JNPF.Saas.Models.Tenant.Entities;
using JNPF.Utils;
using System;
using System.Threading.Tasks;

namespace JNPF.Saas.Logic.TenantLog
{
    /// <summary>
    /// 租户日志
    /// 版 本：V3.0.0
    /// 版 权：引迈信息技术有限公司（https://www.jnpfsoft.com）
    /// 作 者：JNPF开发平台组
    /// 日 期：2020.12.21 
    /// </summary>
    public class TenantLogBll
    {
        private TenantLogIService service = new TenantLogService();
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task Create(TenantLogEntity entity)
        {
            try
            {
                entity.Id = CommonHelper.Guid;
                entity.LoginTime = DateTime.Now;
                await service.Create(entity);
            }
            catch (Exception ex)
            {
                throw ExceptionEx.Throw(ex);
            }
        }
    }
}
